package com.xxxx.dao;

import com.xxxx.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created By ShaoXikai on 2022/7/20
 */
@Mapper
public interface UserDao {

    @Select("select u.uid,u.uname,u.usex from tedu.user u")
    List<User> queryAllStuInfo();

    @Insert("insert into tedu.user(uid, uname, usex) VALUES (#{uid},#{uname},#{usex})")
    int addUser(User user);

    @Select("select * from tedu.user where uid = #{uid}")
    User findById(@Param("uid") Integer id);

    @Delete("delete from tedu.user where uid = #{uid}")
    int delById(@Param("uid") Integer id);

}
